//获取应用实例
const app = getApp()
var api = require('../../utils/api.js')
var util = require('../../utils/util.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
  
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
      windowHeight: app.globalData.windowHeight
    })
  },
  
  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    // console.log(app.globalData);
    this.setData({
      userData: app.globalData.accountInfo
    })
  },
  myOrder:function(e){
    var types = e.currentTarget.dataset.types;
    wx.navigateTo({
      url: '../myOrder/myOrder?types=' + types
    })
  },
  giftCard:function(){
    wx.navigateTo({
      url: '../myGift/myGift'
    })
  },
  coupons: function () {
    wx.navigateTo({
      url: '../coupons/coupons'
    })
  },
  addressList: function () {
    wx.navigateTo({
      url: '../addressList/addressList'
    })
  },
  couponsMy: function () {
    wx.navigateTo({
      url: '../couponsMy/couponsMy'
    })
  },

  afterList:function(){
    wx.navigateTo({
      url: '../afterList/afterList'
    })
  },

  myIncome:function(){
    wx.navigateTo({
      url: '../myIncome/myIncome'
    })
  },

  contact:function(){
    wx.makePhoneCall({
      phoneNumber: '4000788519'
    })
  }
})